<template>
	<div class='search-index container'>
		<Header></Header>
		<section>
			<div class='history-title'>
				<h1>历史搜索</h1>
				<div>全部删除</div>
			</div>
			<ul>
				<li v-for='(item,index) in searchList'
					:key='index'
				>{{item}}</li>
			</ul>
		</section>
		<Tabbar></Tabbar>
	</div>
</template>

<script>
import Header from '@/components/search/Header.vue'
import Tabbar from '@/components/common/Tabbar.vue'
export default{
	data () {
		return {
			searchList:[]
		}
	},
	created(){
		
		this.searchList = JSON.parse(localStorage.getItem('search'));
		
	},
	components:{
		Header,
		Tabbar
	},
	methods:{
		goSearchList(){
			this.$router.push({
				name:'list'
			})
		}
	}
}
</script>

<style lang='scss' scoped>
section{
	.history-title{
		display: flex;
		justify-content: center;
		align-items: center;
	}
	ul{
		display: flex;
		flex-wrap: wrap;
		li{
			padding:0.08rem;
			margin:0.4rem;
			border:1px solid #ccc;
		}
	}
}
</style>
